package com.tqz.rc.server.listener;

import com.tqz.rc.common.util.EnvUtil;
import org.springframework.core.env.ConfigurableEnvironment;

/**
 * <p>
 *
 * @author tianqingzhao
 * @since 2021/9/24 11:37
 */
public class StartingApplicationListener implements TqzRcApplicationListener {

    @Override
    public void environmentPrepared(ConfigurableEnvironment environment) {
        injectEnvironment(environment);
    }

    private void injectEnvironment(ConfigurableEnvironment environment) {
        EnvUtil.setEnvironment(environment);
    }
}
